using System;
using System.Collections.Generic;
namespace time
{
    public class eatmatch : match
    {
        public string work(List<animal> la)
        {
            double d = 0;
            animal win = null;
            foreach (var item in la)
            {
                double d1 = item.eat();
                if (d1 > d)
                {
                    d = d1;
                    win = item;
                }
            }
            return "winner is " + win.name;
        }
    }
}